package system

import (
	"context"
	"gf_blog_admin/internal/service"
	"strings"

	"gf_blog_admin/api/system/v1"
)

func (c *ControllerV1) ConfigKeysData(ctx context.Context, req *v1.ConfigKeysDataReq) (res *v1.ConfigKeysDataRes, err error) {
	res = &v1.ConfigKeysDataRes{}
	confKeys := strings.Split(req.ConfKeys, ",")
	res.Config, err = service.SysConfig().GetData(ctx, confKeys)
	return
}
